package com.tyx.chargingpile.service;

import com.tyx.chargingpile.dao.ChargingStartEndRecordDao;
import com.tyx.chargingpile.pojo.ChargingStartEndRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class ChargingStartEndRecordService {

    @Autowired
    private ChargingStartEndRecordDao chargingStartEndRecordDao;

    public void add(ChargingStartEndRecord chargingStartEndRecord){
        chargingStartEndRecordDao.save(chargingStartEndRecord);
    }

    public ChargingStartEndRecord find(String pileNum,String gunpointNum,String OrderNum){
        return chargingStartEndRecordDao.findByPileNumAndGunpointNumAndOrderNum(pileNum,gunpointNum,OrderNum);
    }
}
